<?php
class Passenger_model extends Model {

    function Passenger_model()
    {
        // Call the Model constructor
        parent::Model();
    }
    
	function insert_passenger($data)
	{
		$this->db->insert($this->db->dbprefix.'passengers', $data);
		return $this->db->insert_id();
	}
	
	function get_passengers_booking($booking_id)
	{
		$this->db->select($this->db->dbprefix . 'passengers.*');
		$query = $this->db->where($this->db->dbprefix . 'passengers.booking_id = '.$booking_id);
		$query = $this->db->get($this->db->dbprefix . 'passengers');
		$passengers = $query->result_array();
		return $passengers;	
	}	
}
?>